﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

using Aliphant.UI;
using Aliphant.UI.Widgets;

namespace ScriptDemo.Views
{
    /// <summary>
    /// WidgetScript.xaml 的交互逻辑
    /// </summary>
    public partial class WidgetScript : BaseWidget, IWidget
    {
        private bool _thumbStatus;

        public WidgetScript()
        {
            InitializeComponent();
        }

        public void Init(Widget widget)
        {

        }

        public void QuickAction1()
        {
            if (_thumbStatus)
            {
                _thumbStatus = false;
                small.Visibility = Visibility.Collapsed;
                normal.Visibility = Visibility.Visible;
            }
            else
            {
                _thumbStatus = true;
                small.Visibility = Visibility.Visible;
                normal.Visibility = Visibility.Collapsed;
            }
        }

        public void QuickAction2()
        {

        }

        public void Close()
        {

        }

        public void SetScriptPath(string scriptPath)
        {

        }



        public string? QuickButton1Tip => "折叠/展开";

        public string? QuickButton2Tip => string.Empty;

        public string? QucikButton1Icon => "Icon.TriangleDown";

        public string? QucikButton2Icon => string.Empty;
    }
}
